<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>{include file="public/header" /}
    <!--页面加上边的--->
    <style>
        .weui-cells {
            margin: 20px;
            border-radius: 10px;
            border: none;
        }
        
        .weui-cells::before {
            border: none;
        }
        
        .weui-cells::after {
            border: none;
        }
    </style>
    <div class="vue_box" vcloak>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell_hd">
                    <label class="weui-label">昵称</label>
                </div>
                <div class="weui-cell_bd weui-cell_primary">
                    <input id="realname" class="weui-input" type="text" placeholder="你的昵称" v-model="postData.name">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell_hd">
                    <label class="weui-label">邮箱</label>
                </div>
                <div class="weui-cell_bd weui-cell_primary">
                    <input id="email" class="weui-input" type="email" placeholder="你的电子邮箱" v-model="postData.email">
                </div>
            </div>
        </div>
        <div class="weui-cells__title">消息设置</div>
        <div class="weui-cells weui-cells_radio">
            <label class="weui-cell weui-check__label" for="x11">
                <div class="weui-cell__bd">
                    <p>接收系统消息推送</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" name="test1" id="x11" class="weui-check" value="1" v-model="postData.radio">
                    <span class="weui-icon-checked"></span>

                </div>
            </label>
            <label class="weui-cell weui-check__label" for="x12">
                <div class="weui-cell__bd">
                    <p>不接收系统消息推送</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" name="test1" id="x12" class="weui-check" value="2" v-model="postData.radio">
                    <span class="weui-icon-checked"></span>

                </div>
            </label>
        </div>
        <div class="weui-cells__title">推送设置</div>
        <div class="weui-cells weui-cells_checkbox">
            <label class="weui-cell weui-check__label" for="s11">
                <div class="weui-cell__hd">
                    <input type="checkbox" class="weui-check" name="checkbox" id="s11" value="1"
                        v-model="postData.checkbox"> <i class="weui-icon-checked"></i>

                </div>
                <div class="weui-cell__bd">
                    <p>每年推送一次</p>
                </div>
            </label>
            <label class="weui-cell weui-check__label" for="s12">
                <div class="weui-cell__hd">
                    <input type="checkbox" class="weui-check" name="checkbox" id="s12" value="2"
                        v-model="postData.checkbox"> <i class="weui-icon-checked"></i>

                </div>
                <div class="weui-cell__bd">
                    <p>每月推送一次</p>
                </div>
            </label>
            <label class="weui-cell weui-check__label" for="s13">
                <div class="weui-cell__hd">
                    <input type="checkbox" class="weui-check" name="checkbox" id="s13" value="3"
                        v-model="postData.checkbox"> <i class="weui-icon-checked"></i>

                </div>
                <div class="weui-cell__bd">
                    <p>每日推送一次</p>
                </div>
            </label>
        </div>
        <div class="weui-cells__title">名片设置</div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell weui-cell_switch">
                <div class="weui-cell__bd">展示名片</div>
                <div class="weui-cell__ft">
                    <input class="weui-switch" type="checkbox" v-model="postData.switch1">
                </div>
            </div>
            <div class="weui-cell weui-cell_switch">
                <div class="weui-cell__bd">展示个人主页</div>
                <div class="weui-cell__ft">
                    <input class="weui-switch" type="checkbox" v-model="postData.switch2">
                </div>
            </div>
            <div class="weui-cell weui-cell_warn">
                <div class="weui-cell__bd">展示个人主页</div>
                <div class="weui-cell__ft"> <i class="weui-icon-warn"></i>

                </div>
            </div>
        </div>
        <div class="demos-content-padded" style="padding:0px 20px 10px 20px;">
            <button type="button" @click="save" class="weui-btn weui-btn_primary">保存资料</button>
        </div>
    </div>{include file="public/footer" /}
    <script>
        VUE_APP = new Vue({
            el: ".vue_box",
            data: {
                postData: {
                    name: "Hamm",
                    email: "admin@hamm.cn",
                    radio: '2',
                    checkbox: [
                        "1"
                    ],
                    switch1: true,
                    switch2: false,
                },
            },
            created: function() {
                wx.ready(function() {});
                this.getData();
            },
            methods: {
                getData: function() {
                    //去Ajax请求服务器要初始数据回来绑定到POSTdata上
                },
                save: function() {
                    _loading();
                    setTimeout(function() {
                        alert(JSON.stringify(VUE_APP.postData));
                        _hideLoading();
                    }, 3000);
                    // $.post("/admin/node/getList", {
                    //     node_module: this.node_module,
                    //     node_controller: this.node_controller,
                    //     node_action: this.node_action
                    // }, function (data, status) {
                    //     if (data.code != 200) {
                    //         if (data.url) {
                    //             location.replace(data.url);
                    //         }
                    //         _alert(data.msg);
                    //         app.nomoredata = data.msg;
                    //     } else {
                    //         if (data.data.list.length == 0) {
                    //             app.nomoredata = "没有更多数据了";
                    //         }
                    //         app.list = data.data.list;
                    //     }
                    // });
                },
            }
        });
    </script>
    </body>

</html>